import request from '@/config/axios'

// 共建院校对应专业 VO
export interface SchMajVO {
  id: number // 主键
  schId: number // 学校id
  majId: number // 专业id
}

// 共建院校对应专业 API
export const SchMajApi = {
  // 查询共建院校对应专业分页
  getSchMajPage: async (params: any) => {
    return await request.get({ url: `/dbit/sch-maj/page`, params })
  },

  // 查询共建院校对应专业详情
  getSchMaj: async (id: number) => {
    return await request.get({ url: `/dbit/sch-maj/get?id=` + id })
  },

  // 新增共建院校对应专业
  createSchMaj: async (data: SchMajVO) => {
    return await request.post({ url: `/dbit/sch-maj/create`, data })
  },

  // 修改共建院校对应专业
  updateSchMaj: async (data: SchMajVO) => {
    return await request.put({ url: `/dbit/sch-maj/update`, data })
  },

  // 删除共建院校对应专业
  deleteSchMaj: async (id: number) => {
    return await request.delete({ url: `/dbit/sch-maj/delete?id=` + id })
  },

  // 导出共建院校对应专业 Excel
  exportSchMaj: async (params) => {
    return await request.download({ url: `/dbit/sch-maj/export-excel`, params })
  },
}